/*
* This file is a part of the open-eBackup project.
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
*
* Copyright (c) [2024] Huawei Technologies Co.,Ltd.
*
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
*/
#include "GetServerListRequest.h"

HCS_PLUGIN_NAMESPACE_BEGIN

namespace {
const int32_t DEFAULT_OFFSET_NUM = 1;
const int32_t DEFAULT_LIMIT_NUM = 25;
}

GetServerListRequest::GetServerListRequest()
{
    m_status = "";
    m_statusIsSet = false;
    m_ip = "";
    m_ipIsSet = false;
    m_name = "";
    m_nameIsSet = false;
    m_offset = DEFAULT_OFFSET_NUM;
    m_offstIsSet = false;
    m_limit = DEFAULT_LIMIT_NUM;
    m_limitIsSet = false;
    m_markerIsSet = false;
    m_marker = "";
}

GetServerListRequest::~GetServerListRequest() {}

Scope GetServerListRequest::GetScopeType() const
{
    return Scope::PROJECT;
}

ApiType GetServerListRequest::GetApiType()
{
    return ApiType::NOVA;
}

std::string GetServerListRequest::GetServerStatus() const
{
    return m_status;
}

bool GetServerListRequest::ServerStatusIsSet() const
{
    return m_statusIsSet;
}

void GetServerListRequest::UnsetServerStatus()
{
    m_statusIsSet = false;
}

void GetServerListRequest::SetServerStatus(const std::string& value)
{
    m_status = value;
    m_statusIsSet = true;
}

std::string GetServerListRequest::GetServerIp() const
{
    return m_ip;
}

bool GetServerListRequest::ServerIpIsSet() const
{
    return m_ipIsSet;
}

void GetServerListRequest::UnsetServerIp()
{
    m_ipIsSet = false;
}

void GetServerListRequest::SetServerIp(const std::string& value)
{
    m_ip = value;
    m_ipIsSet = true;
}

std::string GetServerListRequest::GetServerName() const
{
    return m_name;
}

bool GetServerListRequest::ServerNameIsSet() const
{
    return m_nameIsSet;
}

void GetServerListRequest::UnsetServerName()
{
    m_nameIsSet = false;
}

void GetServerListRequest::SetServerName(const std::string& value)
{
    m_name = value;
    m_nameIsSet = true;
}

int32_t GetServerListRequest::GetServerOffset() const
{
    return m_offset;
}

bool GetServerListRequest::ServerOffsetIsSet() const
{
    return m_offstIsSet;
}

void GetServerListRequest::UnsetServerOffset()
{
    m_offstIsSet = false;
}

void GetServerListRequest::SetServerMarker(const std::string &value)
{
    m_marker = value;
    m_markerIsSet = true;
}

std::string GetServerListRequest::GetServerMarker() const
{
    return m_marker;
}

bool GetServerListRequest::ServerMarkerIsSet() const
{
    return m_markerIsSet;
}

void GetServerListRequest::UnsetServerMarker()
{
    m_markerIsSet = false;
}

void GetServerListRequest::SetServerOffset(const int32_t& value)
{
    m_offset = value;
    m_offstIsSet = true;
}

int32_t GetServerListRequest::GetServerLimit() const
{
    return m_limit;
}

bool GetServerListRequest::ServerLimitIsSet() const
{
    return m_limitIsSet;
}

void GetServerListRequest::UnsetServerLimit()
{
    m_limitIsSet = false;
}

void GetServerListRequest::SetServerLimit(const int32_t& value)
{
    m_limit = value;
    m_limitIsSet = true;
}

HCS_PLUGIN_NAMESPACE_END